package cn.liuxiany.alibaba.storage.service.impl;

import cn.liuxiany.alibaba.storage.entity.StorageEntity;
import cn.liuxiany.alibaba.storage.mapper.StorageMapper;
import cn.liuxiany.alibaba.storage.service.IStorageService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author liuxiany
 * @date 2023/10/19
 */
@Slf4j
@Service(value = "myStorageService")
@Transactional(rollbackFor = Exception.class)
public class StorageServiceImpl implements IStorageService {

    @Autowired
    private StorageMapper storageMapper;

    @Override
    public void addStorage(StorageEntity storage) {
        storageMapper.insert(storage);
    }
}
